﻿Module DrawingModule
    Public Sub OpenPicture()
        If ViewerForm.ofdSelectPicture.ShowDialog = DialogResult.OK Then
            ViewerForm.picShowPicture.Image = Image.FromFile(ViewerForm.ofdSelectPicture.FileName)
            ViewerForm.sbrMyStatusStrip.Items(0).Text = ViewerForm.ofdSelectPicture.FileName
        End If
    End Sub

    Public Sub DrawBorder(ByRef objPicturebox As PictureBox)
        Dim objGraphics As Graphics
        objGraphics = objPicturebox.Parent.CreateGraphics
        objGraphics.Clear(System.Drawing.SystemColors.Control)

        objGraphics.DrawRectangle(System.Drawing.Pens.Blue, objPicturebox.Left - 1, objPicturebox.Top - 1, objPicturebox.Width + 1, objPicturebox.Height + 1)
        objGraphics.Dispose()
    End Sub
End Module
